#include<iostream>
#include"quad.cpp"
using value = quad;
using value_ptr = value * ;
using size = int;
struct node{
    value_ptr data;
    node * next;
};
using node_ptr = node * ;

class list{
private:
    node_ptr head,tail;
    size num;
public:
    list();
    ~list();
    void push(value* e);

    friend class iterator;

    class iterator{
    private:
        node_ptr p;
    public:
        iterator(node_ptr q = nullptr) : p(q) { }

        bool operator != (const iterator& i ){
            return p!=i.p;
        }
        iterator& operator ++(){
            p = p->next;
            return *this;
        }
        void print(){
            p->data->review();
        }
    };

    iterator begin(){
        return iterator(head);
    }
    iterator end() {
        return iterator(tail);
    }
};
